
    /**
    * Check to see if fields are a valid integer.
    * Fields are not checked if they are disabled.
    * <p>
    * @param form The form validation is taking place on.
    */
    function validateInteger(form) {
        var bValid = true;
        var focusField = null;
        var i = 0;
        var fields = new Array();
        var formName = form.getAttributeNode("name"); 

        oInteger = eval('new ' + formName.value + '_integer()');
        for (x in oInteger) {
            var field = form[oInteger[x][0]];

            if (field){
                var valores = createCampos(field);
                for (j=0;j<valores.length; j++){
                    if (!validInteger(valores[j].valor)){
           	            bValid = false;
                        if (i == 0) {
                            focusField = valores[j].campo;
                        }
                        fields[i++] = oInteger[x][1];
                    }
	            }
	        }
	    }
        if (fields.length > 0) {
           setFocus(focusField);
           alerte(fields);
        }
        return bValid;
    }

   